package org.example.diet_compass.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.example.diet_compass.domain.Users;

/**
* @author 86135
* @description 针对表【users(用户基本信息表)】的数据库操作Mapper
* @createDate 2025-03-02 15:03:07
* @Entity generator.domain.Users
*/
public interface UsersMapper extends BaseMapper<Users> {

    @Update("update users set avatar = #{fileUrl} where id = #{userId}")
    void updateAvatarById(int userId, String fileUrl);
    @Select("select avatar from users where id=#{userId}")
    String getAvatarUrlById(int userId);
}




